<?php
$q=$_GET["q"];
//echo "---------".$q;
if($q=="otro"||$q==0){
	echo "Especifique: <input type= \"text\" name=\"insOtraCarrera\" id=\"insOtraCarrera\" style=\"visibility:visible\"  onChange=\"conMayusculas(this)\">";
}
else{
$con = mysql_connect('localhost', 'feseor5_fese', 'Fs666AdQe');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("feseor5_miportaldev02", $con);
mysql_query("SET NAMES 'utf8'");
$sql="SELECT nmb_carrera FROM cat_carrera WHERE cve_carrera= '".$q."' LIMIT 1";

$result = mysql_query($sql);
$row = mysql_fetch_array($result);
//echo "<span class=\"selectRequiredMsg\">Seleccione un elemento.</span></span><span id=\"spryOtra\">";
echo "<input type=\"text\" name=\"insOtraCarrera\" id=\"insOtraCarrera\" style=\"visibility:hidden\" value=\"".$row['nmb_carrera']."\">";
//echo "<span class=\"textfieldRequiredMsg\">Se necesita un valor.</span></span>";
mysql_close($con);
}

?>